// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 固资测算结果profit枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2024-10-11
 */
public enum InvestmentProfitEnum {
    UNITS(1, "Units"),
    SELLING_PRICE_PER_UNIT(2, "Selling Price per unit"),
    NIS(3, "Net Invoiced Sales (NIS)"),
    CUSTOMER_DISCOUNTS(4, "Customer discounts and rebates (VIP)&Cash discount"),
    EXPENSE_DISCOUNT(5, "Expense discount"),
    NET_SALES(6, "Net sales"),
    PRODUCT_COST_PER_UNIT(7, "Product cost per unit"),
    TOTAL_PRODUCT_COST(8, "Total Product cost"),
    ODC(9, "ODC"),
    FREIGHT_OUT(10, "Freight Out"),
    TOTAL_VARIABLE_COST(11, "Total Variable cost"),
    STANDARD_CONTRIBUTION_MARGIN(12, "Standard Contribution Margin"),
    SALES_COMMISSIONS(13, "Sales commissions"),
    SERVICE_AND_WARRANTY(14, "Service and Warranty"),
    ACTUAL_CONTRIBUTION(15, "Actual Contribution"),
    ACTUAL_CONTRIBUTION_PERCENT(16, "Actual Contribution %"),
    DIRECT_SELLING_EXPENSE(17, "Direct selling expense"),
    INDIRECT_SELLING_EXPENSE(18, "Indirect selling expense"),
    ADVERTISING_LAUNCH(19, "Advertising launch"),
    ENGINEERING(20, "Engineering"),
    PRODUCT_LIABILITY_INSURANCE(21, "Product liability insurance"),
    EBIT(22, "EBIT impact (from growth)"),
    TOTAL_EXPENSES(23, "Total expenses");

    private int value;

    private String name;

    InvestmentProfitEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        InvestmentProfitEnum[] arrObj = InvestmentProfitEnum.values();
        for (InvestmentProfitEnum obj : arrObj) {
            if (value== obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
